/*
 * Copyright (c) 2024 -present FengJinjian ( 751965763@qq.com )
 * [... 标准 Apache License 头 ...]
 */
package edu.vital.energy.longevity.domain.dto.contract;

import java.math.BigDecimal;

/**
 * ContractUpdateDTO - 更新合同DTO
 *
 * @version 1.0.1
 * @author FengJinJian
 * @date 2025/01/10 10:00
 */
public record ContractUpdateDTO(
    String name,
    Integer paymentType,
    Integer contractType,
    BigDecimal amount,
    String adminName
) {
    // 紧凑型构造函数，进行参数验证
    public ContractUpdateDTO {
        if (amount != null && amount.compareTo(BigDecimal.ZERO) <= 0) {
            throw new IllegalArgumentException("合同金额必须大于0");
        }
    }
} 